home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / C64 / T-TPUG Old Monthly Disks / (c)tf.d64 / terminal.c1 v2.c (.txt) < prev    next >
Commodore BASIC  |  2007-02-04  |  2KB  |  66 lines

  1. 10 REM  *** NEW PROTOCOL ***
  2. 20 REM  RELEASE 2: OCT 27 1984
  3. 30 REM  BY STEVE PUNTER
  4. 40 IFPEEK(49152)<>169THENLOAD"TERM.C1 V2",8,1
  5. 50 OPEN5,2,0,CHR$(8):GET#5,A$:BS=255:OPEN1,8,15:DIMT$(3):SYS49176
  6. 60 TY$="PSP":T$(1)="[208]ROGRAM":T$(2)="[211][197][209]":T$(3)="[215]ORD[208]RO":CS=1.02273E6
  7. 70 BR$="300":GOSUB6000
  8. 80 PRINT"[147][207]PTION: ("+BR$+" [194]AUD) [194]LOCK [211]IZE ="BS""
  9. 90 PRINT"   1 - [212]ERMINAL [205]ODE"
  10. 100 PRINT"   2 - [212]RANSMIT A [198]ILE"
  11. 110 PRINT"   3 - [210]ECEIVE A [198]ILE"
  12. 120 PRINT"   4 - [195]HANGE [194]LOCK [211]IZE"
  13. 130 PRINT"   5 - [212]OGGLE [194]AUD [210]ATE (300-1200)"
  14. 140 GETA$:IFA$=""THEN140
  15. 150 IFA$="2"THEN1000
  16. 160 IFA$="3"THEN2000
  17. 170 IFA$="4"THEN3000
  18. 180 IFA$="1"THENPRINT"[212]ERMINAL [205]ODE:":GOTO4000
  19. 190 IFA$="5"THEN6700
  20. 200 GOTO140
  21. 1000 PRINT"[208]ROGRAM [206]AME? ";:GOSUB5000:IFI$=""ORFL=1THEN80
  22. 1010 PRINT"[198]ILE [212]YPE ([208], [211], OR [215])?  [146][157]";
  23. 1020 GETA$:IFA$=""THEN1020
  24. 1030 IFA$="[133]"THEN80
  25. 1040 IFA$="P"THENSA=0:T=1:GOTO1080
  26. 1050 IFA$="S"THENSA=2:T=2:GOTO1080
  27. 1060 IFA$="W"THENSA=0:T=3:GOTO1080
  28. 1070 GOTO1020
  29. 1080 PRINTT$(T)"":OPEN2,8,SA,I$:INPUT#1,E$,EM$,T$,S$
  30. 1090 IFVAL(E$)>0THENPRINT""E$","EM$","T$","S$:CLOSE2:GOTO1010
  31. 1120 SYS49173:POKE51227,T:SYS49164:IFPEEK(512)=1THENCLOSE2:GOTO4000
  32. 1130 SYS49173:POKE51224,BS:SYS49158:CLOSE2:GOTO4000
  33. 2000 PRINT"[211]AVE [193]S? ";:GOSUB5000:IFI$=""ORFL=1THEN80
  34. 2010 SYS49173:SYS49161:IFPEEK(512)=1THEN4000
  35. 2020 T$=","+MID$(TY$,PEEK(51227),1)+",W"
  36. 2025 PRINT"[198]ILE [212]YPE: "T$(PEEK(51227))
  37. 2030 OPEN2,8,2,"@0:"+I$+T$:FORX=1TO1300:NEXTX:PRINT:SYS61310
  38. 2040 SYS49173:SYS49155:CLOSE2:FORX=1TO1500:NEXTX:POKE668,PEEK(667):GOTO4000
  39. 3000 PRINT"[194]LOCK [211]IZE? ";:GOSUB5000:IFI$=""THEN80
  40. 3010 BS=VAL(I$):IFBS<40THENBS=40
  41. 3020 IFBS>255THENBS=255
  42. 3030 GOTO80
  43. 4000 PRINT
  44. 4010 SYS49173:SYS49167:GOTO80
  45. 5000 I$="":FL=0
  46. 5010 PRINT" [146][157]";
  47. 5020 GETA$:IFA$=""THEN5020
  48. 5030 IFA$=CHR$(13)THEN5100
  49. 5040 IFA$=CHR$(20)THEN5080
  50. 5045 IFA$="[133]"THENFL=1:GOTO5100
  51. 5050 IFLEN(A$)>20THEN5020
  52. 5060 IF(ASC(A$)AND127)<32THEN5020
  53. 5070 PRINTA$;:I$=I$+A$:GOTO5010
  54. 5080 IFLEN(I$)=0THEN5020
  55. 5090 PRINT" [157][157]";:I$=LEFT$(I$,LEN(I$)-1):GOTO5010
  56. 5100 PRINT" ":RETURN
  57. 6000 S=VAL(BR$):POKE659,6:IFS=1200THENPOKE659,8
  58. 6010 RC=CS/S:GOSUB6500:POKE51968,LO:POKE51969,HI
  59. 6020 IFS=1200THENRC=CS/S*.966:GOSUB6500
  60. 6030 POKE665,LO:POKE666,HI
  61. 6040 RC=CS/S/2-100:GOSUB6500:POKE661,LO:POKE662,HI:RETURN
  62. 6500 HI=INT(RC/256):LO=INT(RC-HI*256):RETURN
  63. 6700 IFBR$="300"THENBR$="1200":GOTO6720
  64. 6710 BR$="300"
  65. 6720 GOSUB6000:GOTO80
  66.